<template>
  <div>
    <roll height="533px">
      <export-table ref="table" title="月结汇总账单">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column type="index" label="序号" width="108px"></el-table-column>
          <el-table-column prop="date" label="总用电量(度)"></el-table-column>
          <el-table-column prop="code" label="总充电费用(元)"></el-table-column>
        </el-table>
      </export-table>
    </roll>
    <div class="block">
      <el-pagination
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-size="pageSize"
        layout="total,  prev, pager, next, jumper"
        :total="20"
      ></el-pagination>
    </div>
    <div class="pupo">
      <monthCycle v-show="isShow" @close="close"></monthCycle>
     </div>
  </div>
</template>
<script>
import exportTable from "@/components/exportTable";
import roll from "@/components/Roll";
import monthCycle from "./monthCycle"
export default {
    components:{
        roll,
        exportTable,
        monthCycle
    },
  data() {
    return {
      isShow:false,
      tableData: [
        {
          date: "2016-05-02",
          code: "1589518635483"
        },
        {
          date: "2016-05-04",
          code: "1589518635483"
        },
        {
          date: "2016-05-01",
          code: "1589518635483"
        }
      ],
      currentPage: 1, //当前第几页
      pageSize: 10
    };
  },
  methods: {
    handleSizeChange(e) {
      this.$emit("SizeChange", e);
    },
    handleCurrentChange(e) {
      this.$emit("CurrentChange", e);
    },
    exportMonthSummaryTable(){
      this.$refs.table.exportExcel();
    },
    time(){
      this.isShow=true
    },
     close(){
      this.isShow=false
    }
  }
};
</script>
<style scoped>
.block{
    text-align: center;
}
.pupo {
  position: absolute;
  top:50px;
  z-index: 9;
  left: 50%;
  transform: translate(-50%);
}
</style>